#!/usr/bin/env python
# datetime: 2021/7/12 下午5:52

# report
REPORT_HEART_BEAT = 0x01
REPORT_SCA = 0x11
REPORT_VULN_NORNAL = 0x21
REPORT_VULN_DYNAMIC = 0x22
REPORT_VULN_OVER_POWER = 0x23
REPORT_VULN_SAAS_POOL = 0x24
REPORT_VULN_HARDCODE = 0x25

REPORT_AUTH_ADD = 0x31
REPORT_AUTH_UPDATE = 0x32
REPORT_ERROR_LOG = 0x51
REPORT_API_ROUTE = 0x61
REPORT_THIRD_PARTY_SERVICE = 0x81
REPORT_FILE_PATH = 0x82


# strategy
STRATEGY_ENABLE = "enable"
STRATEGY_DISABLE = "disable"

RUNNING = 1

# 定义Agent运行状态
CORE_IS_RUNNING = 1
CORE_NOT_RUNNING = 0

# 定义重放类型
VUL_REPLAY = 1
REQUEST_REPLAY = 2
API_REPLAY = 3

# 定义重放数据类型
PENDING = 0
WAITING = 1
SOLVED = 2
SOLVING = 3
DISCARD = 4

# 定义漏洞验证结果
RECHECK_ERROR = 2
RECHECK_TRUE = 1
RECHECK_FALSE = 0
RECHECK_DISCARD = 3

# 定义漏洞状态
VUL_WAITING = "待验证"
VUL_VERIFY = "验证中"
VUL_TRUE = "已确认"
VUL_FALSE = "已忽略"

# hook strategy type
HOOK_TYPE_ENABLE = 1
HOOK_TYPE_DISABLE = 0

USER_BUGENV = "dt-range"

SYSTEM_USER_ID = 1

# 定义规则状态
ENABLE = 1
DISABLE = 0
DELETE = -1

# 定义规则类型
RULE_PROPAGATOR = 1
RULE_SOURCE = 2
RULE_FILTER = 3
RULE_SINK = 4
RULE_ENTRY_POINT = 5

# 定义规则对应的用户
RULE_USER = "user"
RULE_SYSTEM = "system"
RULE_IS_SYSTEM = 1
RULE_IS_ENABLE = 1

# 限制每页的最大数量
MAX_PAGE_SIZE = 50

VUL_PENDING = 1
VUL_VERIFYING = 2
VUL_CONFIRMED = 3
VUL_SOLVED = 5
VUL_IGNORE = 6


# API 操作 tag
OPERATE_GET = "operate-GET"
OPERATE_POST = "operate-POST"
OPERATE_PUT = "operate-PUT"
OPERATE_DELETE = "operate-DELETE"
